import request from '@/utils/request'

// 查询成品检化验结果列表
export function listAnalysis(query) {
  return request({
    url: '/test/analysis/list',
    method: 'get',
    params: query
  })
}

// 查询成品检化验结果列表(分页)
export function pageAnalysis(query) {
  return request({
    url: '/test/analysis/page',
    method: 'get',
    params: query
  })
}

// 查询成品检化验结果详细
export function getAnalysis(id) {
  return request({
    url: '/test/analysis/get/' + id,
    method: 'get'
  })
}

// 新增成品检化验结果
export function addAnalysis(data) {
  return request({
    url: '/test/analysis/add',
    method: 'post',
    data: data
  })
}

// 修改成品检化验结果
export function updateAnalysis(data) {
  return request({
    url: '/test/analysis/edit',
    method: 'post',
    data: data
  })
}

// 删除成品检化验结果
export function delAnalysis(id) {
  return request({
    url: '/test/analysis/remove/' + id,
    method: 'post'
  })
}

export function exportRecord(query) {
  return request({
    url: '/test/analysis/export',
    method: 'get',
    params: query
  })
}
